package vn.com.epi.data.table;

import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;

public class NeighbourTable {

    public static final String NAME = "Neighbour";
    public static final  byte[] NAME_BYTES = Bytes.toBytes("Neighbour");
    public static final byte[] FAM_MAIN = Bytes.toBytes("main");
    public static final byte[] COL_NEAREST = Bytes.toBytes("nearest");
    
    public NeighbourTable() {
        
    }
    
    public static String getNearest(Result result) {
        String nearest;
        try {
        	nearest = Bytes.toString(result.getValue(FAM_MAIN, COL_NEAREST));
        } catch (Exception e) {
        	nearest = "";
        }
        return nearest;
    }

}
